package com.zk.ppa.dao.repository;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zk.ppa.dao.mapper.AccoutMapper;
import com.zk.ppa.dao.po.Accout;
import org.springframework.stereotype.Repository;

/**
* <p>
* 系统的账户表 扩展的dao层
* </p>
*
* @author AutoGenerator
* @since 2021-03-21
*/
@Repository
public class AccoutRepository extends ServiceImpl<AccoutMapper, Accout>  {

    /**
     * 根据账号查找账号的基本信息
     * @param account
     * @return
     */
    public Accout getByAccount(long account) {
        QueryWrapper<Accout> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq(Accout.ACCOUNT, account);
        Accout accout = this.getOne(queryWrapper);
        return accout;
    }
}
